from common.mysql.MySQLhelper import get_sql_helper

sqlhelper = get_sql_helper()


def get_event_manager_list(user_id, from_user_id, msg_actual_user_id, now_time, five_mine_time):
    return sqlhelper.fetch_all(
        "select id from shequn_event_manager where user_id = %s and from_user_id = %s and msg_actual_user_id = %s and create_time between %s and %s",
        (user_id, from_user_id, msg_actual_user_id, five_mine_time, now_time))


def update_event_manager(id, content):
    sqlhelper.update("update shequn_event_manager set event_picture = %s where id = %s", (content, id))
